import java.util.*;

public class FootballLeagueSystem {
    public static void main(String[] args) {
        List<String> teams = Arrays.asList(
            "北京国安", "上海申花", "广州恒大", "山东鲁能",
            "江苏苏宁", "武汉卓尔", "天津泰达", "河北华夏"
        );

        League league = new League(teams);

        // 模拟一轮比赛结果
        league.updateResults("北京国安", "上海申花", 2, 1);
        league.updateResults("广州恒大", "山东鲁能", 3, 0);
        league.updateResults("江苏苏宁", "武汉卓尔", 1, 1);
        league.updateResults("天津泰达", "河北华夏", 0, 2);

        // 获取并打印排名
        List<Team> standings = league.getStandings();
        System.out.println("排名  队名            场次 胜 平 负 进球 失球 净胜 积分");
        for (int i = 0; i < standings.size(); i++) {
            System.out.printf("%-4d %s%n", i + 1, standings.get(i));
        }
    }
}

